package com.abel.quiz.vo;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import java.util.ArrayList;
import java.util.List;

import com.abel.quiz.po.OptionsPo;

/**
* @author abel.lin
* @date_time 2017-08-08 20:18
* @description
*/
public class OptionsDomain extends OptionsPo {

    public static OptionsDomain genDomain(OptionsPo model){
        if(model == null){
            model = new OptionsPo();
        }
        OptionsDomain domain = JSON.parseObject(JSON.toJSONString(model), OptionsDomain.class);
        return domain;
    }

    public static List<OptionsDomain> genDomainList(List<OptionsPo> modelList){
        if(modelList == null){
            modelList = new ArrayList<OptionsPo>();
        }
        List<OptionsDomain> domainList = JSONArray.parseArray(JSONArray.toJSONString(modelList), OptionsDomain.class);
        return domainList;
    }

}
